perm filename TEST.MF[MF,DEK]2 blob sn#750645 filedate 1984-04-12 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00007 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	delimiters ()
C00006 00003	primarydef x**y = mexp(y*mlog x) enddef
C00008 00004	stop
C00009 00005	=enddef
C00010 00006	path p
C00011 00007	showvar e
C00012 ENDMK
CāŠ—;
delimiters ();
def tracingall=tracingcommands:=3;
 tracingedges:=1; tracingtitles:=1; tracingequations:=1; tracingspecs:=2;
	tracingpens:=1; tracingchoices:=1; tracingstats:=2;
 tracingonline:=1;tracingoutput:=1;tracingmacros:=3 enddef;
tracingall;
pausing:=1;
openwindow 0 from (0,0) to (380,300) at (0,300);

edges ee;
ee = nulledges;

addto ee contour (30,30)..(120,30)..(150,90)..(80,120)..(20,70)..cycle;

display ee on 0;


x1=5; x1a=6;
numeric x[]a;
showvar x;

string s[];
s1=s2; s3=s4; s5=s6; s1=s3; show s2; showvar s;

edges e[];
e2=nulledges;
addto e2 contour ((0,0)..(10,20){0,1}..(0,30))..cycle withweight 2;
showall e2;
addto e2 contour (0,0)..(5,5)..cycle withweight -3;
showall e2;
cull e2 by (-3,1);
showall e2;
forever: path p; p=(0,1); (0,1)=p; showall p; endfor; % interrupt this!
end
x+1=y:=y+1=z:=1/2x=z+2;

show (0,0){0,1}..(100,0){100,-1};
show (0,0){0,1}..tension 2 and 3..(100,0){100,-1};
show (0,0){0,1}..bounded..(100,0){100,-1};
show 3[b,c], a[b,b], a[b,c];

a   + b/2 + c/3 + d/4 = 3;
a/2 + b/3 + c/4 + d/5 = 1;
a/3 + b/4 + c/5 + d/6 = 4;
a/4 + b/5 + c/6 + d/7 = 1;

show a   + b/2 + c/3 + d/4;
show a/2 + b/3 + c/4 + d/5;
show a/3 + b/4 + c/5 + d/6;
show a/4 + b/5 + c/6 + d/7;

0=1; a=a; "abc"="abc"; "abc"="abc ";

forever show "abc"; exitif false; exitiftrue; endfor;

pair right, left, a.zz;
transform t;
right = -left = 2a.zz = (1,0);
show right,left,t;
vardef z@# = (x@#,y@#) enddef;
vardef p[]slope=(#@dx,#@dy) enddef;
p5slope=left;
showvar p;

def penpos(suffix i)(expr l,theta)=
     z.i.r-z.i.quote l = (l,0) rotated theta;
     z.i = .5[z.i.quote l, z.i.r] enddef;
d=45;
penpos(4,15,d+90);

z1+z2=right;
showdependencies;
z1-z2=left;
path p[];p5=z1..z2;
showall z1,z2,p5;

a1=a2+a3+a4+a5+a6;
a2=a3+a4+a5+a6;
showdependencies;
a3=a4+a5+a6;
a4=a5+a6;
showdependencies;
a5=a6=1/3;


def t=
xx3.1..[[a+-bc_d.e] ]"a string %" <>$1."+-""" % forget this
enddef;
showtoken t;
transform t;
showtoken t;


path p[], x[]arc, f[][];
showvar x;


end

primarydef x**y = mexp(y*mlog x) enddef;
show 1+5**2*2;

vardef round primary x = floor(x+.5) enddef;
u=.21;
show round 15u;

vardef good[] primary x=
    begingroup save t;
    if odd w@: t=(floor x)+.5;
    else: t=round x;
    fi; t endgroup enddef;
w3=4.9; x10=15.2; show good3 x10,x10.good;

secondarydef x+++y = sqrt(x*x+y*y) enddef;
show 1+50++50,1+50+++50;

%dump
edges e[];
e[-20]=nulledges;
%addto e[-20] contour ((0,0)..(100,200)..(0,300))..tension 3..cycle;
addto e[-20] contour ((0,0)..(100,200){0,1}..(0,300))..cycle;
%addto e[-20] contour (0,0)..(0,100)..cycle;
%addto e[-20] contour (0,0)..controls (1,0) and (1,2)..
%  (0,2)..controls (-1,2) and (-1,0)..cycle;
%addto e[-20] contour (0,0)..controls (49,0) and (49,100)..
%  (0,100)..controls (-49,100) and (-49,0)..cycle;
%showall e[-20];
%proofing:=1;
"testing";
shipout e[-20];
openwindow .00011 from (0,0) to (380,400) at (-250,275);
%openwindow .00011 from (0,0) to (380,400) at (-250,325);
%openwindow .00011 from (0,0) to (200,300) at (-50,150);
display e[-20] on .00011;
openwindow .00005 from (200,300) to (250,350) at (-150,275);
display e[-20] on .00005;
stop;
end
stop;
def
=;enddef;
path p;
showtoken tracingall;
showtoken
;showvar e;
showall p,a+b,b+a+begingroup showalldependencies; c endgroup,(0,5){curl 2};
p=(0,0)..(100,200)..(0,300);
showall stop,p..cycle;
end
tracingall;
def testmac(expr a,b)(text c)=show a,b,c; enddef;
testmac(3,4)(year);
show (if true: 0 else: 1 fi)+(if false: 2 elseif true: 3 else: 4 fi)
 +(if false: 5 else: 6 fi);
forever show "abc"; exitif false; exitiftrue; endfor;
show stop,normaldeviate,normaldeviate,time,time-.1;
for n=1 step 5 until 13; show n; endfor;
errorstopmode;stop;